package com.sky.module.system.heart.config;

import com.sky.module.system.heart.handle.HeartBeatRecordHandler;
import com.sky.module.system.heart.manager.HeartBeatManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author
 * @date 2023/3/11 16:31
 **/
@Configuration
public class HeartConfig {
    @Autowired
    private HeartBeatRecordHandler heartBeatRecordHandler;

    /***
     * @description 心跳服务入口
     *
     * @return com.sky.module.system.heart.manager.HeartBeatManager
     * @date 2023/3/11 16:32
     *
     */
    @Bean
    public HeartBeatManager heartBeatManager() {
        return new HeartBeatManager(heartBeatRecordHandler);
    }
}
